<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

	<%int counter =0; %>

	<%@include file="/GoHome.jsp"%>
	<h4 align="center"><%@include file="/Search/search.jsp"%></h4>
	

	<div class="sidebar-image-gallery">

	<table width="20%" border="0" cellspacing="0" cellpadding="0">

			<c:forEach items="${photos}" var="photo">
				<form action="/Cs420Web/PhotoDisplay" method="get">

					<input type="image" name="photo" value="${photo.url}"
						src="${photo.url}" width="300" height="300">





					<%if (counter == 0){
						out.print("<tr>");
					}%>

					<%counter++; %>



					<td><input type="hidden" name="image"
						value="${photo.idPicture}"></td>

					<%if (counter == 3){ 
							counter =0;
							out.print("</tr>");
						}%>
				
		
				</form>
		</c:forEach>
		</table>
	</div>

</body>
</html>
